package o;

import android.os.AsyncTask;
import com.huawei.appgallery.serverreqkit.api.bean.ResponseBean;
import com.huawei.appgallery.serverreqkit.api.listener.IServerCallBack;

public class eul {
    private static eul ˊ;
    private cvy ˎ;

    protected eul() {
        fhz ˋ = fho.ˏ().ˋ("ServerReqKit");
        if (ˋ != null) {
            this.ˎ = (cvy) ˋ.ॱ(cvy.class);
        } else {
            Logger.e("ServerAgent", "wishlist create failed");
        }
    }

    public static synchronized eul ˎ() {
        eul o_eul;
        synchronized (eul.class) {
            if (ˊ == null) {
                ˊ = new eul();
            }
            o_eul = ˊ;
        }
        return o_eul;
    }

    public AsyLoader ॱ(cvt o_cvt, IServerCallBack iServerCallBack) {
        if (this.ˎ != null) {
            return this.ˎ.ˊ(o_cvt, iServerCallBack);
        }
        Logger.e("ServerAgent", "invokeServer(request, callback) iServerAgent == null");
        return null;
    }

    public ResponseBean ॱ(cvt o_cvt) {
        if (this.ˎ != null) {
            return this.ˎ.ˏ(o_cvt);
        }
        Logger.e("ServerAgent", "invokeServer(request) iServerAgent == null");
        return new ResponseBean();
    }

    public AsyLoader ˎ(cvt o_cvt, IServerCallBack iServerCallBack) {
        if (this.ˎ != null) {
            return this.ˎ.ॱ(o_cvt, iServerCallBack);
        }
        Logger.e("ServerAgent", "invokeServerForList(request, callback) iServerAgent == null");
        return null;
    }

    public boolean ˏ(int i) {
        if (this.ˎ != null) {
            return this.ˎ.ॱ(i);
        }
        Logger.e("ServerAgent", "callFrontReqSync iServerAgent == null");
        return false;
    }

    public boolean ˊ(AsyncTask asyncTask) {
        if (this.ˎ != null) {
            return this.ˎ.ˎ(asyncTask);
        }
        Logger.e("ServerAgent", "isTaskRunning iServerAgent == null");
        return false;
    }

    public void ॱ() {
        if (this.ˎ != null) {
            this.ˎ.ˎ();
        } else {
            Logger.e("ServerAgent", "clearCache iServerAgent == null");
        }
    }
}
